Widgets should only call set_realized() after having created and
registered their GDK windows. In this case, the creation of the style
context (or more exactly: figuring out the scale factor for it) requires
knowing if the widget is already realized. Which it isn't.
https://bugzilla.gnome.org/show_bug.cgi?id=726717
priv = GTK_EXPANDER (widget)->priv;
- gtk_widget_set_realized (widget, TRUE);
-
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
get_expander_bounds (GTK_EXPANDER (widget), &expander_rect);
priv->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_register_window (widget, priv->event_window);
+
+ gtk_widget_set_realized (widget, TRUE);
}
static void